<?php

/**
 * 
 * IndexAction.class.php(后台首页)
 *
 * @package      	YOURPHP
 * @author          liuxun QQ:147613338 <admin@yourphp.cn>
 * @copyright     	Copyright (c) 2008-2011  (http://www.yourphp.cn)
 * @license         http://www.yourphp.cn/license.txt
 * @version        	YourPHP企业网站管理系统 v2.1 2012-10-08 yourphp.cn $
 */
if(!defined("Yourphp")) exit("Access Denied");
class ResourcesAction extends AdminbaseAction
{
    function _initialize()
    {

    }

    public function index()
    {
	        import('@.ORG.Page');

        if ($_GET['mobile']) {
            $map['mobile'] = $_GET['mobile'];
        }

        $user = M('resources');
        $count = $user->where($map)->count();
        $page = new Page($count, 15);
        $show = $page->show();
        $this->assign("page", $show);
        $list = $user->order('id desc')->where($map)->limit($page->firstRow . ',' . $page->listRows)->select();
        $this->assign('list', $list);
        $this->assign('count', $count);
        $this->assign($_GET);
        $name = M('user')->getfield('id,realname') ;
        $this->assign('name', $name);
        $xiangmu = M('f_item')->getfield('id,title') ;
        $this->assign('xiangmu', $xiangmu);
        $this->display();
    }

	
}
?>